this.border = new St.Bin({ style_class: 'window-clone-border' });
let title = new St.Label({ style_class: 'window-caption',
- text: metaWindow.title });
+ text: this._getCaption() });
title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
windowClone.actor.label_actor = title;
this._updateCaptionId = metaWindow.connect('notify::title', w => {
this.title.text = w.title;
+ this.title.text = this._getCaption();
this.relayout(false);
});
}
},
+ _getCaption() {
+ let metaWindow = this._windowClone.metaWindow;
+ if (metaWindow.title)
+ return metaWindow.title;
+
+ let tracker = Shell.WindowTracker.get_default();
+ let app = tracker.get_window_app(metaWindow);
+ return app.get_name();
+ },
+
_animateOverlayActor(actor, x, y, width, height) {
let params = { x: x,
y: y,